<template>
	<view>
		<view class="menu">
			<u-dropdown :dropDownShow="dropDownShow" @open="openDropdown" @close="closeDropdown" duration="300">
				<u-dropdown-item v-model="value1" title="距离" :options="options1"></u-dropdown-item>
				<u-dropdown-item v-model="value2" title="温度" :options="options2"></u-dropdown-item>
			</u-dropdown>
		</view>
		<view class="main">
			<liveCard v-for="(item,index) in liveData" :item="item" :key="index"></liveCard>
		</view>
	</view>
</template>

<script>
	import liveCard from "@/components/liveCard/liveCard.vue"
	export default {
		components:{
			liveCard
		},
		data() {
			return {
				liveData:[
					{
						title:"塑形训练健康每一天",
						createTime:"2022-10-11  19:00:00",
						desc:"塑性，顾名思义，其实就是打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观...",
						userPic:require("@/static/img/logo.png"),
						username:"李文龙",
						status:0
					},
					{
						title:"塑形训练健康每一天",
						createTime:"2022-10-11  19:00:00",
						desc:"塑性，顾名思义，其实就是打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观...",
						userPic:require("@/static/img/logo.png"),
						username:"李文龙",
						status:1
					},
					{
						title:"塑形训练健康每一天",
						createTime:"2022-10-11  19:00:00",
						desc:"塑性，顾名思义，其实就是打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观...",
						userPic:require("@/static/img/logo.png"),
						username:"李文龙",
						status:0
					},
					{
						title:"塑形训练健康每一天",
						createTime:"2022-10-11  19:00:00",
						desc:"塑性，顾名思义，其实就是打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观打造身形外观...",
						userPic:require("@/static/img/logo.png"),
						username:"李文龙",
						status:2
					}
				],
				value1: 1,
								value2: 2,
								options1: [{
										label: '默认排序',
										value: 1,
									},
									{
										label: '距离优先',
										value: 2,
									},
									{
										label: '价格优先',
										value: 3,
									}
								],
								options2: [{
										label: '去冰',
										value: 1,
									},
									{
										label: '加冰',
										value: 2,
									},
								],
								dropDownShow:false
			};
		},
		methods:{
			openDropdown(){
				this.dropDownShow = true
			},
			closeDropdown(){
				this.dropDownShow = false
				// document.querySelector('.site-content').style.zIndex = "1000";
			},
			
		}
	}
</script>

<style lang="scss">
	::v-deep.u-dropdown {
		background-color: #fff;
	}
	
	.main{
		margin: 37rpx 30rpx;
	}
</style>
